package edu.jd.movieplatform.info.cnmComment;

import edu.jd.movieplatform.common.Result;
import edu.jd.movieplatform.info.cinema.Cinema;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @descriptions:
 * @data: 2021/7/19 12:11
 */
@RestController
@RequestMapping("/info/cnmComment")
public class CnmCommentAPI {
    @Resource
    private CnmCommentService service;

    @GetMapping("/cnmComment-listByCnmId")
    public Result cnmCommentListByCnmId(CnmCommentDto dto){
        List<CnmComment> cnmCommentList=service.getCnmCommentList(dto);
        return Result.success(cnmCommentList);
    }
    @PostMapping ("/addComment")
    public Result addComment(@RequestBody CnmCommentDto dto){
        service.addComment(dto);
        return Result.success();
    }
}
